package com.sinosoft.vaccinetoai.common.mapper.extend;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.UpdateProvider;
import tk.mybatis.mapper.annotation.RegisterMapper;

import java.util.List;

/**
 * 扩展Mapper 批量更新
 * @author xzh
 * @date 2022-10-24 14:38
 * @since 5.0.0
 */
@RegisterMapper
public interface ExtendBatchUpdateMapper<T> {

    /**
     * 批量更新
     * @param recordList 参数列表
     * @author xzh
     * @since 5.0.0
     */
    @UpdateProvider(type = ExtendBatchUpdateProvider.class, method = "dynamicSQL" )
    void batchUpdate(@Param("list") List<? extends T> recordList);

    /**
     * 批量更新 Selective
     * @param recordList 参数列表
     * @author xzh
     * @since 5.0.0
     */
    @UpdateProvider(type = ExtendBatchUpdateProvider.class, method = "dynamicSQL" )
    void batchUpdateSelective(@Param("list") List<? extends T> recordList);

}
